{include file="header.html"}
<script type="text/javascript" src="templates/js/jquery.colorbox.js"
	charset="utf-8"></script>
<link href="templates/style/colorbox.css" rel="stylesheet"
	type="text/css" />
<script src="templates/jsnew/MediaStreamRecorder.js"> </script>
<script type="text/javascript">


$(function(){
	typechange();
    $('#acategory_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.noerror').hide();          
            $(element).after(error);
        },
        success       : function(element){
        	 $(element).next('.noerror').show();  
        	 $(element).remove();
        	
        },
        rules : {    
        	wm_carrier : {
                required : true
            },
            wm_vhc_code :{
                required : true
            },
            wm_driver :{
            	required : true
            },
            wm_driver_tel :{
                required : true
            },
            
            wm_loading_place :{
                required : true
            },
            wm_loading_date :{
                required : true
            },
            wm_unloading_place :{
                required : true
            },
            wm_required_service_date :{
                required : true
            },
       
            link    :{
                url     : true
            },
            sort_order:{
               number   : true
            },
            file_url : {
                accept  : 'gif|png|jpe?g'
            }
        },
        messages : {
        	wm_carrier : {
                required : '承运商必填'
            },
            wm_vhc_code : {
                required : '车牌号必填'
            },
            wm_driver : {
                required : '司机必填'
            },
            wm_vhc_code : {
                required : '车牌号必填'
            },
            wm_driver_tel : {
                required : '司机电话必填'
            },
            
            wm_loading_place : {
                required : '装货地必填'
            },
            wm_loading_date : {
                required : '装货时间必填'
            },
            wm_unloading_place : {
                required : '卸货地必填'
            },
            wm_required_service_date : {
                required : '卸货时间必填'
            },
            
            
            link    : {
                url     : '{$lang.link_limit}'
            },
            file_url : {
                accept : '{$lang.limit_img}'
            },
            sort_order  : {
                number   : '{$lang.number_only}'
            }
        }
    });
    
    
    $('#form11').validate({
        errorPlacement: function(error, element){
            $(element).next('.noerror').hide();          
            $(element).after(error);
        },
        success       : function(element){
        	 $(element).next('.noerror').show();  
        	 $(element).remove();
        	
        },
        rules : {    
            ws_box :{
            	required : true
            },
            ws_volume :{
            	required : true
            },
            ws_ctn_no :{
            	required : true
            },
            ws_ship :{
            	required : true
            },
            ws_voyage :{
            	required : true
            },
            ws_awb_code :{
            	required : true
            }
        },
        messages : {
            ws_box : {
                required : '箱型必填'
            },
            ws_volume : {
                required : '箱量必填'
            },
            ws_ctn_no : {
                required : '箱号必填'
            },
            ws_ship : {
                required : '船名必填'
            },
            ws_voyage : {
                required : '航次必填'
            },
            ws_awb_code : {
                required : '提单号必填'
            }
        }
    });
    
    
    $('#form1').validate({
        errorPlacement: function(error, element){
            $(element).next('.noerror').hide();          
            $(element).after(error);
        },
        success       : function(element){
        	 $(element).next('.noerror').show();  
        	 $(element).remove();
        	
        },
        rules : {    
            ws_name :{
            	required : true
            },
            ws_piece :{
            	required : true
            },
            ws_weight :{
            	required : true
            },
            ws_size :{
            	required : true
            }
        },
        messages : {
            ws_name : {
                required : '品名必填'
            },
            ws_piece : {
                required : '箱件必填'
            },
            ws_weight : {
                required : '箱重必填'
            },
            ws_size : {
                required : '箱尺必填'
            }
        }
    });
    
});

$(function(){
    $('#wm_required_service_date').datetimepicker({changeMonth: true,changeYear: true});
    $('#wm_loading_date').datetimepicker({changeMonth: true,changeYear: true});
    
    
    $("#pc").click(function(){
    	  $w=$(window).width();
          $h=$(window).height();
          $w=$w*0.7;
      	$("#tagframe").width($w);
          $.colorbox({
              width : $w+20,
              height : "650px",
              inline : true,
              href : "#taglist"
          });
    });
    
    $("[id^='tr_']").dblclick(function(){
    	var data=$(this).attr("data");
    	data=JSON.parse(data);
    	if(data!=undefined&&data.ws_tid!=undefined&&data.ws_tid>0){
    		if(data.ws_gid>0){
    			alert('由货单生成,数据不能修改');
    		}else{
    		$("#ws_tid").val(data.ws_tid);
    		$("#ws_box").val(data.ws_box);
    		$("#ws_volume").val(data.ws_volume);
    		$("#ws_ctn_no").val(data.ws_ctn_no);
    		$("#ws_eir_code").val(data.ws_eir_code);
    		$("#ws_awb_code").val(data.ws_awb_code);
    		$("#ws_ship").val(data.ws_ship);
    		$("#ws_voyage").val(data.ws_voyage);
    		$("#ws_container_depot").val(data.ws_container_depot);
    		$("#ws_full_container_depot").val(data.ws_full_container_depot);
    		$("#ws_note1").val(data.ws_note);
    		
    		 $("[id^='tr_']").removeClass("gb");
    		 $(this).addClass("gb");
    		}
    	}else{
    		alert("数据错误");
    	}
    });
    
    $("[id^='ntr_']").dblclick(function(){
    	var data=$(this).attr("data");
    	data=JSON.parse(data);
    	if(data!=undefined&&data.ws_tid!=undefined&&data.ws_tid>0){
    		if(data.ws_gid>0){
    			alert('由货单生成,数据不能修改');
    		}else{
    		$("#ws_tidn").val(data.ws_tid);
    		$("#ws_name").val(data.ws_name);
    		$("#ws_piece").val(data.ws_piece);
    		$("#ws_weight").val(data.ws_weight);
    		$("#ws_size").val(data.ws_size);
    		$("#ws_owner").val(data.ws_owner);
    		$("#ws_owner_tel").val(data.ws_owner_tel);
    		$("#ws_loading_place").val(data.ws_loading_place);
    		$("#ws_unloading_place").val(data.ws_unloading_place);
    		$("#ws_consignee").val(data.ws_consignee);
    		$("#ws_consignee_tel").val(data.ws_consignee_tel);
    		$("#ws_consignor").val(data.ws_consignor);
    		$("#ws_consignor_tel").val(data.ws_consignor_tel);
    		$("#ws_note").val(data.ws_note);
    		
    		 $("[id^='ntr_']").removeClass("gb");
    		 $(this).addClass("gb");
    		}
    	}else{
    		alert("数据错误");
    	}
    });
});


var mediaRecorder={};
function onMediaSuccess(stream) {
    mediaRecorder = new MediaStreamRecorder(stream);
    mediaRecorder.mimeType = 'audio/ogg';
    mediaRecorder.audioChannels = 1;
    mediaRecorder.ondataavailable = function (blob) {
        
    	var fileType = 'video'; // or "audio"
		var fileName = 'wm_requiredl_note_voice.ogg';  // or "wav" or "ogg"

		var formData = new FormData();
		formData.append(fileType + '-filename', fileName);
		formData.append(fileType + '-blob', blob);

		xhr('index.php?app=upload', formData, function (fileURL) {
		    window.open(fileURL);
		});

		function xhr(url, data, callback) {
		    var request = new XMLHttpRequest();
		    request.onreadystatechange = function () {
		        if (request.readyState == 4 && request.status == 200) {
		            //callback(location.href + request.responseText);
		            $("#wm_requiredl_note_voice").val(request.responseText);
		        }
		    };
		    request.open('POST', url);
		    request.send(data);
		}
    };
    mediaRecorder.start(10*60*1000);
}

function onMediaError(e) {
    console.error('media error', e);
}

function start(){
	$("#stopbtn").show();
	$("#startbtn").hide();
	var mediaConstraints = {audio: true};
	navigator.getUserMedia(mediaConstraints, onMediaSuccess, onMediaError);
}

function stop(){
	if(typeof mediaRecorder.stop=='function'){
		mediaRecorder.stop();
		$("#stopbtn").hide();
		$("#startbtn").show();
	}
}

function typechange()
{
   if($('#field').val()=='集卡进口'||$('#field').val()=='集卡出口'){
	   $('#canshow').show();
	   $('#canshowa').show();
	   $('#canshow1').hide();
	   $('#canshow1a').hide();
	   $("#form1").hide();
	   $("#form11").show();
   }else{
	   $('#canshow').hide();
	   $('#canshowa').hide();
	   $('#canshow1').show();
	   $('#canshow1a').show();
	   $("#form1").show();
	   $("#form11").hide();
   }
}

</script>




<style>
.infoTable label{color:#444;}
html,body{background: #fff;}
.infoTable{
margin: 0 0 0 0;
}
.info th {
    text-align: right;
    padding-right: 15px;
    
}
#form11 th,#form1 th{
text-align: right;
    padding-right: 15px;
}
.infoTableInput,.infoTable select{
	width: 100%;
}
</style>


<div id="rightTop">
	<p>{$lang.waybill}  {$waybill.wm_code}</p>
	<ul class="subnav">
		<li><a class="btn1" href="index.php?app=waybill">{$lang.manage}</a>
		</li>
		<!-- {if $waybill.wm_tid}} -->
		<li>
			<a class="btn1" href="index.php?app=waybill&amp;act=add">{$lang.add}</a>
		</li>
		<li>
			<span>编辑</span></li>
		<!-- {else} -->
		<li>
			<span>新建</span>
		</li><!-- {/if} -->
	</ul>
</div>
<div style="display: none"  >
	<div id="taglist">
	<iframe id="tagframe" src="index.php?app=waybill&act=choose&wid={$waybill.wm_tid}" width="" height="600px" frameborder="0" scrolling="no"></iframe>
	</div>
</div>
<div class="info">
<!-- 	{if $canedit&&$waybill.wm_tid>0} -->
	<div class="infoTable" style="padding-left: 100px;padding-top: 20px"><input class="formbtn" type="button" id="pc" value="派车" />
<!-- 	{if $wm_id} -->
	<input class="formbtn" type="button" id="addhaul" value="新增运程" onclick="window.open('index.php?app=haul&amp;act=add&id={$wm_id}','_self')" />
<!-- 	{/if} -->
	</div>
<!-- 	{/if} -->

	<form method="post" enctype="multipart/form-data" id="acategory_form">
	<div class="jui-cut-label fn-mt25">
	        <div class="jui-message-bar">基本信息</div>
	    </div><input type="hidden" name="wm_code" value="{$waybill.wm_code}" class="mls_names">
		<table class="infoTable">
		 
			<tr>
				<th  class="paddingT15">{$lang.wm_stauts}: 
				<label></label>
				</th>
				<td>
				<input type="text" value="{$waybill.wm_stauts}" class="infoTableInput" readonly="readonly" style="background-color:#eeeeee">
				<label></label>
				</td>
             	<th class="paddingT15">{$lang.wm_type}: <label></label> </th>
             	<td>  <select onchange="typechange()"  class="querySelect" name="field" id="field">{html_options options=$search_options selected=$waybill.wm_type}</select>
             	<label></label>
             	</td>
         </tr>


	<tr>
	<th class="paddingT15">{$lang.wm_opdate}:<label></label> </th>
<td class="paddingT15 wordSpacing5"><input type="text" name="wm_opdate" value="{$waybill.wm_opdate|date:Y-m-d H:i:s}"  class="infoTableInput" id="wm_opdate" readonly="readonly" style="background-color:#eeeeee"><label></label></td>
<th class="paddingT15">{$lang.wm_optid}:<label></label> </th>
<td class="paddingT15 wordSpacing5"><input type="text" name="wm_optid" value="{$waybill.user_name}" class="infoTableInput" id="wm_opdate" readonly="readonly" style="background-color:#eeeeee"><label></label></td>
</tr>
<tr>
	<th class="paddingT15"><label for="parent_id">{$lang.wm_note}:<label></label></label>
	</th>
	<td class="paddingT15 wordSpacing5" colspan="3">
		
		<textarea  name="wm_note" id="wm_note" rows="3" style="width: 100%">{$waybill.wm_note}</textarea>
		<label></label>
		</td>
</tr>

</table>
<div class="jui-cut-label fn-mt25">
	        <div class="jui-message-bar">派车信息</div>
	    </div>
	    <table class="infoTable">
	    <tr>
				<th class="paddingT15"><b style="color: #ff0000">*&nbsp;</b>{$lang.wm_carrier}:<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_carrier" type="text"
					name="wm_carrier" value="{$waybill.wm_carrier}" />
					<label for="wm_carrier" class="noerror">承运商必填</label>
					</td>
					<th class="paddingT15"><label for="parent_id"><b style="color: #ff0000">*&nbsp;</b>{$lang.wm_vhc_code}:</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_vhc_code" type="text"
					name="wm_vhc_code" value="{$waybill.wm_vhc_code}" /><label for="wm_carrier" class="noerror">车牌号必填</label></td>
				
			</tr>

			<tr>
					<th class="paddingT15"><label for="parent_id"><b style="color: #ff0000">*&nbsp;</b>{$lang.wm_driver}:</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_driver" type="text"
					name="wm_driver" value="{$waybill.wm_driver}" /><label for="wm_carrier" class="noerror">司机必填</label></td>
			
			<th class="paddingT15"><label for="parent_id"><b style="color: #ff0000">*&nbsp;</b>{$lang.wm_driver_tel}:</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_driver_tel" type="text"
					name="wm_driver_tel" value="{$waybill.wm_driver_tel}" /><label for="wm_carrier" class="noerror">司机电话必填</label></td>
			
				
			</tr><tr>
			<th class="paddingT15"><label for="parent_id"><b style="color: #ff0000">*&nbsp;</b>装货地:</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_loading_place" type="text"
					name="wm_loading_place" value="{$waybill.wm_loading_place}" /><label for="wm_carrier" class="noerror">装货地必填</label>
				</td>
				<th class="paddingT15"><label for="parent_id">{$lang.wm_loading_date}:</label>
				<label></label></th>
			
						<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_loading_date" type="text"
					name="wm_loading_date"
					value="{$waybill.wm_loading_date|date:Y-m-d H:i}" />
					<label></label>
					</td>
			</tr>

			<tr>
				<th class="paddingT15"><label for="parent_id"><b style="color: #ff0000">*&nbsp;</b>{$lang.wm_unloading_place}:</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_unloading_place" type="text"
					name="wm_unloading_place" value="{$waybill.wm_unloading_place}" /><label for="wm_carrier" class="noerror">卸货地必填</label>
				</td>
			<th class="paddingT15"><label for="parent_id">{$lang.wm_required_service_date}:</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_required_service_date" type="text"
					name="wm_required_service_date"
					value="{$waybill.wm_required_service_date|date:Y-m-d H:i}" />
					<label></label>
					</td>
			</tr>
			
<th class="paddingT15"><label for="parent_id">发车要求:
{if $waybill.wm_stauts=='新建'||$waybill.wm_stauts=='已接单'}
<input type="button" onclick="start()" value="录音" id="startbtn"/>
<input type="button" onclick="stop()" value="停止"  id="stopbtn" style="display: none"/>
{/if}
</label>
				<label></label></th>
				<td class="paddingT15 wordSpacing5" colspan="3" >
					<input type="hidden" id="wm_requiredl_note_voice" name="wm_requiredl_note_voice" value="{$waybill.wm_requiredl_note_voice}"/>
					 {if $waybill.wm_requiredl_note_voice}
<audio controls="controls">

<source src="{$waybill.wm_requiredl_note_voice}" type="audio/ogg">

你的浏览器太老了，请更新否则没法听语音
</audio>
{/if}
					<textarea  name="wm_requiredl_note" id="wm_requiredl_note" rows="3" style="width: 100%">{$waybill.wm_requiredl_note}</textarea>
					
					<label></label></td>
			</tr>

			<tr>
				<th class="paddingT15"><label for="parent_id">{$lang.wm_dispatch_person}:</label><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_dispatch_person" type="text" readonly="readonly"
					name="wm_dispatch_person" value="{$waybill.wm_dispatch_person}" style="background-color:#eeeeee" /><label></label>
				</td>
				<th class="paddingT15"><label for="parent_id">{$lang.wm_dispatch_person_tel}:</label><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_dispatch_person_tel" type="text" readonly="readonly"
					name="wm_dispatch_person_tel"
					value="{$waybill.wm_dispatch_person_tel}" style="background-color:#eeeeee" /><label></label></td>
				
			</tr>
			<tr>
				
					<th class="paddingT15"><label for="parent_id">{$lang.wm_dispatch_date}:</label><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="wm_dispatch_date" type="text" readonly="readonly"
					name="wm_dispatch_date" value="{$waybill.wm_dispatch_date|date:Y-m-d H:i}" style="background-color:#eeeeee" /> <label></label></td>
			</tr>
<tr>
				

</table>

<div class="jui-cut-label fn-mt25">
	        <div class="jui-message-bar">货物信息</div>
	    </div>
	    <table class="infoTable">
<tr id="canshow" style="display: none;">
	<th class="paddingT15">{$lang.wm_ship}: <label></label></th>
	
<td class="paddingT15 wordSpacing5">	<input class="infoTableInput" type="text" name="tname" value="{$waybill.wm_ship}" id="tname" readonly="readonly" style="background-color:#eeeeee">
	<label></label></td>
	
	<th class="paddingT15">{$lang.wm_voyage}: <label></label></th>
	
<td class="paddingT15 wordSpacing5">	<input class="infoTableInput" type="text" name="tname" value="{$waybill.wm_voyage}" id="tname" readonly="readonly" style="background-color:#eeeeee">
	<label></label></td>
	
</tr>
<tr id="canshowa" style="display: none;">
		<th  class="paddingT15">提单号：<label></label></th>
	<td  class="paddingT15 wordSpacing5"><input class="infoTableInput" type="text" name="wm_awb_code" value="{$waybill.wm_awb_code}" id="wm_awb_code" readonly="readonly" style="background-color:#eeeeee"><label></label></td>

	
	<th class="paddingT15"> </th>
	
<td class="paddingT15 wordSpacing5">
	</td>
	
</tr>
		
<tr  id="canshow1" style="display: none;">
	<th class="paddingT15">{$lang.wm_piece}:<label></label> </th>
	
<td class="paddingT15 wordSpacing5">	<input class="infoTableInput" type="text" name="tname" value="{$waybill.wm_piece}" id="tname" readonly="readonly" style="background-color:#eeeeee">
	<label></label></td>
	<th class="paddingT15">{$lang.wm_weight}: <label></label></th>
	
<td class="paddingT15 wordSpacing5">	<input class="infoTableInput" type="text" name="tname" value="{$waybill.wm_weight}" id="tname" readonly="readonly" style="background-color:#eeeeee">
	<label></label></td>
	
</tr>

	<tr id="canshow1a" style="display: none;">
	<th class="paddingT15">{$lang.wm_size}: <label></label></th>
<td class="paddingT15 wordSpacing5">
	<input class="infoTableInput" type="text" name="tname" value="{$waybill.wm_size}" id="tname" readonly="readonly" style="background-color:#eeeeee">
	<label></label></td>
	<th class="paddingT15"> </th>
	
<td class="paddingT15 wordSpacing5">
	</td>
</tr>
</table>
<table class="infoTable">

			<tr>
				<th></th>
<!-- 				{if $canedit} -->
				<td class="ptb20"><input class="formbtn" type="submit"
					name="Submit" value="{$lang.submit}" /> <input class="formbtn"
					type="reset" name="reset" value="{$lang.reset}" /></td>
<!-- 					{/if} -->
			</tr>
		</table>
	</form>
	
</div>
	
{if $waybill.wm_tid}
	<form method="post" enctype="multipart/form-data" action="index.php?app=waybill&act=subaddn" style="min-height: 50px;" id="form1">
	 <input type="hidden" name="ws_wmtid" value="{$waybill.wm_tid}"/>
	 <section class="section_maeginstyle" id="highchart" style="margin-top:70px;">
    <article class="module width_full" style="padding:0 0 20px 0;margin:0;width:100%">
	
	  <div id="rightTop">
	<p>货物信息</p>
</div>
	  <div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $sub_normal}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
            <td>品名</td>
            <td>件</td>
            <td>重</td>
            <td>尺</td>
            <td>货主</td>
            <td>货主电话</td>
            <td>装货地</td>
            <td>卸货地</td>
            <td>收货人</td>
            <td>收货人电话</td>
            <td>发货人</td>
            <td>发货人电话</td>
            <td>备注</td>
            <td class="handler">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$sub_normal item=s}-->

        <tr class="tatr2" id="ntr_{$s.ws_tid}" data='{"ws_tid":"{$s.ws_tid}",
        "ws_name":"{$s.ws_name}",
        "ws_piece":"{$s.ws_piece}",
        "ws_weight":"{$s.ws_weight}",
        "ws_size":"{$s.ws_size}",
        "ws_owner":"{$s.ws_owner}",
        "ws_owner_tel":"{$s.ws_owner_tel}",
        "ws_loading_place":"{$s.ws_loading_place}",
        "ws_unloading_place":"{$s.ws_unloading_place}",
        "ws_consignee":"{$s.ws_consignee}",
        "ws_consignee_tel":"{$s.ws_consignee_tel}",
        "ws_consignor":"{$s.ws_consignor}",
        "ws_consignor_tel":"{$s.ws_consignor_tel}",
        "ws_gid":"{$s.ws_gid}",
        "ws_note":"{$s.ws_note}"}'>
            <td class="firstCell"><input type="checkbox" class="checkitem" value="{$s.ws_tid}"/></td>

            <td>{$s.ws_name}</td>
            <td>{$s.ws_piece}</td>
            <td>{$s.ws_weight}</td>
            <td>{$s.ws_size}</td>
            <td>{$s.ws_owner}</td>
            <td>{$s.ws_owner_tel}</td>
            <td>{$s.ws_loading_place}</td>
            <td>{$s.ws_unloading_place}</td>
            <td>{$s.ws_consignee}</td>
            <td>{$s.ws_consignee_tel}</td>
            <td>{$s.ws_consignor}</td>
            <td>{$s.ws_consignor_tel}</td>
            <td>{$s.ws_note}</td>
            <td class="handler">
            <!-- 				{if $canedit} -->
            <a href="javascript:drop_confirm('确定删除货物信息', 'index.php?app=waybill&amp;act=dropsubn&amp;id={$s.ws_tid}&wid={$waybill.wm_tid}');">{$lang.drop}</a></td>
			<!--             {/if} -->
        </tr>
        <!--{/foreach}-->
    </table>
     <!--{if $sub_normal}-->
      <!-- 				{if $canedit} -->
    <div id="dataFuncs">
		<div class="pageLinks">{include file=page.bottom.html}</div>
		<div id="batchAction" class="left paddingT15">
			&nbsp;&nbsp;
			 <input class="formbtn batchButton" type="button"
				value="{$lang.drop}" name="id" uri="index.php?app=waybill&act=dropsubn&wid={$waybill.wm_tid}"
				presubmit="confirm('{$lang.drop_confirm}');" /> &nbsp;&nbsp;
			<!--<input class="formbtn batchButton" type="button" value="lang.update_order" name="id" presubmit="updateOrder(this);" />-->
		</div>
	</div>
	<div class="clear"></div>
<!-- 	{/if} -->
<!-- 	{/if} -->
    
    </div>
    <style>
    .infoTable p{display: inline-block;width: 100px;}
    </style>
    <table class="infoTable">

			<tr>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>品名:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_name" type="text"
					name="ws_name" value="" /><label for="wm_carrier" class="noerror">品名必填</label>
					
					<input
					class="infoTableInput" id="ws_tidn" type="hidden"
					name="ws_tid" value="" />
				</td>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>件: </p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_piece" type="text"
					name="ws_piece" value="" /><label for="wm_carrier" class="noerror">箱件必填</label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>重:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_weight" type="text"
					name="ws_weight" value="" /><label for="wm_carrier" class="noerror">箱重必填</label>
				</td>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>尺:</p><label></label> </th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_size" type="text"
					name="ws_size" value="" /><label for="wm_carrier" class="noerror">箱尺必填</label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>货主:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_owner" type="text"
					name="ws_owner" value="" /><label></label>
				</td>
				<th  class="paddingT15"><p>货主电话:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_owner_tel" type="text"
					name="ws_owner_tel" value="" /><label></label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>装货地:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_loading_place" type="text"
					name="ws_loading_place" value="" /><label></label>
				</td>
				<th  class="paddingT15"><p>卸货地:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_unloading_place" type="text"
					name="ws_unloading_place" value="" /><label></label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>收货人:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_consignee" type="text"
					name="ws_consignee" value="" /><label></label>
				</td>
				<th  class="paddingT15"><p>收货人电话:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_consignee_tel" type="text"
					name="ws_consignee_tel" value="" /><label></label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>发货人:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_consignor" type="text"
					name="ws_consignor" value="" /><label></label>
				</td>
				<th  class="paddingT15"><p>发货人电话:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_consignor_tel" type="text"
					name="ws_consignor_tel" value="" /><label></label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>备注:</p><label></label></th>
				<td class="paddingT15 wordSpacing5" colspan="3"><textarea
					rows="3" id="ws_note" 
					name="ws_note" style="width: 100%;"></textarea><label></label>
				</td>
			</tr>
			<tr>
				<th class="ptb20"></th>
				<td ><input class="formbtn" type="submit"
					name="Submit" value="保存" /></td>
			</tr>
			</table>
			</article></section>
    </form>
    
   <form method="post" enctype="multipart/form-data" action="index.php?app=waybill&act=subadd" style="min-height: 50px;" id="form11">
    <input type="hidden" name="ws_wmtid" value="{$waybill.wm_tid}"/>
	 <section class="section_maeginstyle" id="highchart" style="margin-top:70px;">
    <article class="module width_full" style="padding:0 0 20px 0;margin:0;width:100%">
	
	  <div id="rightTop">
	<p>集装箱信息</p>
	</div>
	  <div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $sub_trunk}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
            <td>箱型</td>
            <td>箱量</td>
            <td>箱号</td>
            <td>设备交接单号</td>
            <td>提单号</td>
            <td>船名</td>
            <td>航次</td>
            <td>空箱场站</td>
            <td>重箱场站</td>
            <td>备注</td>
            <td class="handler">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$sub_trunk item=s}-->

        <tr class="tatr2" id="tr_{$s.ws_tid}" data='{"ws_tid":"{$s.ws_tid}",
        "ws_box":"{$s.ws_box}",
        "ws_volume":"{$s.ws_volume}",
        "ws_ctn_no":"{$s.ws_ctn_no}",
        "ws_eir_code":"{$s.ws_eir_code}",
        "ws_awb_code":"{$s.ws_awb_code}",
        "ws_ship":"{$s.ws_ship}",
        "ws_voyage":"{$s.ws_voyage}",
        "ws_container_depot":"{$s.ws_container_depot}",
        "ws_full_container_depot":"{$s.ws_full_container_depot}",
        "ws_gid":"{$s.ws_gid}",
        "ws_note":"{$s.ws_note}"}'>
            <td class="firstCell"><input type="checkbox" class="checkitem" value="{$s.ws_tid}"/></td>

            <td>{$s.ws_box}</td>
            <td>{$s.ws_volume}</td>
            <td>{$s.ws_ctn_no}</td>
            <td>{$s.ws_eir_code}</td>
            <td>{$s.ws_awb_code}</td>
            <td>{$s.ws_ship}</td>
            <td>{$s.ws_voyage}</td>
            <td>{$s.ws_container_depot}</td>
            <td>{$s.ws_full_container_depot}</td>
            <td>{$s.ws_note}</td>
            <td class="handler">
            <!-- 				{if $canedit} -->
            <a href="javascript:drop_confirm('确定删除集装箱信息', 'index.php?app=waybill&amp;act=dropsub&amp;id={$s.ws_tid}&wid={$waybill.wm_tid}');">{$lang.drop}</a></td>
<!--             {/if} -->
        </tr>
        <!--{/foreach}-->
        
    </table>
    <!--{if $sub_trunk}-->
        
        <!-- 				{if $canedit} -->
    <div id="dataFuncs">
		<div class="pageLinks">{include file=page.bottom.html}</div>
		<div id="batchAction" class="left paddingT15">
			&nbsp;&nbsp;
			 <input class="formbtn batchButton" type="button"
				value="{$lang.drop}" name="id" uri="index.php?app=waybill&act=dropsub&wid={$waybill.wm_tid}"
				presubmit="confirm('{$lang.drop_confirm}');" /> &nbsp;&nbsp;
			<!--<input class="formbtn batchButton" type="button" value="lang.update_order" name="id" presubmit="updateOrder(this);" />-->
		</div>
	</div>
	<div class="clear"></div>
<!-- 	{/if} -->
	<!--{/if}-->
    </div>
    <style>
    .infoTable p{display: inline-block;width: 100px;}
    </style>
    <table class="infoTable">

			<tr>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>箱型: </p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5">
				<input class="infoTableInput" id="ws_box" type="text"
					name="ws_box" value="" /><label for="wm_carrier" class="noerror">箱型必填</label>
					
					<input
					class="infoTableInput" id="ws_tid" type="hidden"
					name="ws_tid" value="" />
				</td>
				<th  class="paddingT15"><p>重箱场站:</p><label></label></th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_full_container_depot" type="text"
					name="ws_full_container_depot" value="" /><label></label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>箱量:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_volume" type="text"
					name="ws_volume" value="" /><label for="wm_carrier" class="noerror">箱量必填</label>
				</td>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>箱号:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_ctn_no" type="text"
					name="ws_ctn_no" value="" /><label for="wm_carrier" class="noerror">箱号必填</label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>设备交接单号:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_eir_code" type="text"
					name="ws_eir_code" value="" /><label></label>
				</td>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>船名:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_ship" type="text"
					name="ws_ship" value="" /><label for="wm_carrier" class="noerror">船名必填</label>
				</td>
			</tr>
				<tr>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>航次:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_voyage" type="text"
					name="ws_voyage" value="" /><label for="wm_carrier" class="noerror">航次必填</label>
				</td>
				<th  class="paddingT15"><p>空箱场站:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_container_depot" type="text"
					name="ws_container_depot" value="" /><label></label>
				</td>
			</tr>
			<tr>
				<th  class="paddingT15"><p><b style="color: #ff0000">*&nbsp;</b>提单号:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5"><input
					class="infoTableInput" id="ws_awb_code" type="text"
					name="ws_awb_code" value="" /><label for="wm_carrier" class="noerror">提单号必填</label>
				</td>
				<th  class="paddingT15">
				</th>
				<td class="paddingT15 wordSpacing5"></td>
			</tr>
				<tr>
				<th  class="paddingT15"><p>备注:</p><label></label>
				</th>
				<td class="paddingT15 wordSpacing5" colspan="3"><textarea
					 id="ws_note1" rows="3"
					name="ws_note" style="width: 100%;"></textarea><label></label>
				</td>
			</tr>
<!-- 			{if $canedit} -->
			<tr>
				<th class="ptb20"></th>
				<td ><input class="formbtn" type="submit"
					name="Submit" value="保存" /></td>
			</tr>
<!-- 			{/if} -->
			</table>
			</article></section>
    </form>
    {/if}
{include file="footer.html"}
